﻿<div ng-controller="inviteHorsePowerSettingController">
    <div class="wrapper border-bottom white-bg page-heading">
        <div class="col-lg-pull-12">
            <ol class="breadcrumb">
                <li><a href="javascript:void(0)" ng-click="goBack()">邀请好友(超过10人)马力设置</a></li>
                <li class="active" ng-bind="breadcrumb"></li>
            </ol>
        </div>
    </div>
    <form name="_form" class="form-horizontal w5c-form" w5c-form-validate="model.validateOptions" role="form" novalidate>
        <div class="form-group">
            <label class="col-sm-2 control-label">邀请超过10人后所增加马力</label>
            <div class="col-sm-5">
                <input type="number" name="soup_value" class="form-control input-sm" ng-model="model.horse_power" min="0" step="1" placeholder="邀请超过10人后所增加马力"
                       onkeyup="if(this.value.length==1){this.value=this.value.replace(/[^0-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}" onafterpaste="if(this.value.length==1){this.value=this.value.replace(/[^0-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}">
            </div>
        </div>
        <div class="form-group form-group-sm">
            <label class="col-sm-2 control-label">开始时间</label>
            <div class="col-sm-3">
                <div datetime class="input-group date">
                    <input class="form-control input-sm" ng-model="model.begin_time" required>
                    <span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
                </div>
            </div>
        </div>
        <div class="form-group form-group-sm">
            <label class="col-sm-2 control-label">结束时间</label>
            <div class="col-sm-3">
                <div datetime class="input-group date">
                    <input class="form-control input-sm" ng-model="model.end_time" required>
                    <span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
                </div>
            </div>
        </div>
        <div class="form-group form-group-sm">
            <label class="col-sm-2 control-label">状态</label>
            <div class="col-sm-2">
                <select name="status" class="form-control input-sm" ng-model="model.status_value" required>
                    <option ng-repeat="x in model.e_status_list" value="{{x.value}}">{{x.text}}</option>
                </select>
            </div>
        </div>
        <div class="form-group form-group-sm">
            <label class="col-sm-2 control-label"></label>
            <div class="col-sm-3">
                <button ng-if="model.status == 2 || model.id == 0" type="submit" w5c-form-submit="save()" class="btn btn-primary btn-sm" btn-loading="psdisabled.save" loading-text="保存中..." ng-disabled="psdisabled.save">
                    <i class="fa fa-save"></i> 保存
                </button>
                <button ng-if="model.status == 2" ng-click="goBack()" class="btn btn-primary btn-sm"><i class="fa fa-rotate-left"></i> 取消</button>
                <button ng-if="model.status != 2" ng-click="goBack()" class="btn btn-primary btn-sm"><i class="fa fa-rotate-left"></i> 返回</button>
            </div>
        </div>
    </form>
</div>